Print at Dec 15, 2025, 7:40:17 PM

Posted by Puybaret at Sep 12, 2010, 11:23:06 PM
Re: Easy 3D light bulb positioning
db4tech, I don't know how you tried bump mapping in the advanced rendering plugin, but each time you want to try a new feature of SunFlow, you should try this:
- Search the SunFlow feature you want in SunFlow wiki. For example, bump mapping is explained here.
- Look at its SunFlow syntax, for example:
modifier {
name bumpName
type bump
texture "C:\texturepath\mybump.jpg"
scale -0.02
}

- View SCParser class, which contains all the Java calls matching a SunFlow feature.
- In this class, look for the syntax words found in the Wiki. Looking for "bump" will bring you to the line 613 in the parseModifier method.
- Reproduce the Java syntax in your program from the calls made on the api object. For bump mapping it seems to be this:
this.sunflow.parameter("texture", filePath);
this.sunflow.parameter("scale", scaleAsFloat);
this.sunflow.modifier(appearanceName, "bump_map");
(not sure it should be appearanceName though).

I hope this will help you.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator