Hi Fabrice,

I added the following
                                while(chunk.length >= 36000) {
                                        var str : String = 
chunk.substring(0,36000);
                                        chunk = chunk.substr(36000);
                                        connection.send("_away3dfeed", 
"onReceivedData", str);
                                }
                                connection.send("_away3dfeed", 
"onReceivedData", chunk);
                                setTimeout(sendParts, 40, connection);

and it worked, well kind of
I created sphere in a simple way
            var earthMat:WhiteShadingBitmapMaterial = new 
WhiteShadingBitmapMaterial(BitmapAsset(new earthClass()).bitmapData);
                        earthMat.ambient_brightness = 2;
                        earthMat.diffuse_brightness =  8; //for Jupiter 4;
                        earthMat.specular_brightness = 0;
                        earthMat.smooth = true;
                        _earth = new Sphere( {  material:earthMat, 
                                                radius:solar.earth.radius, 
                                                segmentsW:32, segmentsH:32, 
                                                name:"earth",
                                                y:0, 
                                                x:0, 
                                                z:0 } );

where earthClass declared as

                [Embed(source='assets/earth.jpg')]
                private var earthClass:Class;   

earth.jpg has size about 150K

On Apr 20, 2010, at 3:51 AM, Fabrice3D wrote:

> thats weird, cause thats the very reason Prefab connects and send chunks of 
> data due to this limitation.
> 
> try modify
> var loop:int = (aData.length > 450)? 450 : aData.length;
> 
> set lower like 350
> 
> About your earth, how big is it? I mean a sphere exceeding 40k of data is a 
> hell of a sphere!
> 
> Fabrice
> 
> 
> 
> 
> On Apr 20, 2010, at 2:56 AM, Dmitry Markman wrote:
> 
>> Hi Fabrice
>> I tried to use connector
>> but I got
>> 
>> ArgumentError: Error #2084: The AMF encoding of the arguments cannot exceed 
>> 40K.
>>      at flash.net::LocalConnection/send()
>>      at 
>> away3d.materials.utils.data::AwayConnector/sendParts()[/Users/dima/Desktop/FromNava/svnroot/pangeaflex/simulations/trunk/logal/src/away3d/materials/utils/data/AwayConnector.as:57]
>>      at Function/http://adobe.com/AS3/2006/builtin::apply()
>>      at SetIntervalTimer/onTimer()
>>      at flash.utils::Timer/_timerDispatch()
>>      at flash.utils::Timer/tick()
>> 
>> 
>> in my update method I just did the following
>>      _awayConnector.send(_earth);
>> 
>> where 
>>          private var _awayConnector : AwayConnector = new AwayConnector();
>> thanks
>> 
>> 
>> 
>> 
>> On Apr 19, 2010, at 4:59 PM, Fabrice3D wrote:
>> 
>>> download Prefab, import a sphere via connector or as external 3d object, 
>>> select render normalmap, save...
>>> you also can use your map as bumpmap to add some volume to the continents.
>>> 
>>> you can find this technological wonder here :))
>>> www.closier.nl/prefab
>>> 
>>> Fabrice
>>> 
>>> 
>>> 
>>> On Apr 19, 2010, at 10:37 PM, Dmitry Markman wrote:
>>> 
>>>> Hi Fabrice,
>>>> 
>>>> but if I use dot3 I guess I need some normal mapping
>>>> how I build that normal map for the earth surface?
>>>> 
>>>> I tried to use the same image for the normal map, but then I 
>>>> can't see nice shadow from the sun
>>>> <PastedGraphic-2.png>
>>>> 
>>>> WhiteShadingBitmapMaterial works just fine, but no smoothing
>>>> so I guess I have to add some shader
>>>> I'm new in that business
>>>> 
>>>> thanks in advance
>>>> 
>>>> On Apr 19, 2010, at 3:47 PM, Fabrice3D wrote:
>>>> 
>>>>> Why not use dot3 material?
>>>>> 
>>>>> Fabrice
>>>>> 
>>>>> 
>>>>> On Apr 19, 2010, at 9:29 PM, Dmitry Markman wrote:
>>>>> 
>>>>>> Hi
>>>>>> I have a problem with earth texture
>>>>>> currently I have the following rendering
>>>>>> 
>>>>>> <PastedGraphic-1.png>
>>>>>> 
>>>>>> 
>>>>>> is it possible to get smooth texture?
>>>>>> 
>>>>>> here is the code for creating earth:
>>>>>> 
>>>>>>  var earthMat:WhiteShadingBitmapMaterial = new 
>>>>>> WhiteShadingBitmapMaterial(BitmapAsset(new earthClass()).bitmapData);
>>>>>>  earthMat.ambient_brightness = 2;
>>>>>>  earthMat.diffuse_brightness =  8; //for Jupiter 4;
>>>>>>  earthMat.specular_brightness = 0;
>>>>>>  earthMat.smooth = true;
>>>>>>  _earth = new Sphere( {  material:earthMat, 
>>>>>>                          radius:solar.earth.radius, 
>>>>>>                          segmentsW:32, segmentsH:32, 
>>>>>>                          name:"earth",
>>>>>>                          y:0, 
>>>>>>                          x:0, 
>>>>>>                          z:0 } );
>>>>>> 
>>>>>> thanks in advance
>>>>>> 
>>>>>> Dmitry Markman
>>>>>> 
>>>>> 
>>>> 
>>>> Dmitry Markman
>>>> 
>>> 
>> 
>> Dmitry Markman
>> 
> 

Dmitry Markman



-- 
Subscription settings: http://groups.google.com/group/away3d-dev/subscribe?hl=en

Reply via email to